<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>maskShow插件</title>
    <meta name="description" content="nnn">
    <meta name="keywords" content="">
    <style>
        .myBox{
            width: 200px;
            height: 200px;
            position: absolute;
            left: 100px;
            top: 50%;
            background: mediumvioletred;
            text-align: center;
            overflow: hidden;
        }
        .targetMask{
            display: none;
            width: 200px;
            height: 200px;
            position: absolute;
            color: whitesmoke;
            background: rgb(0,0,0);
            opacity: 0.5;
            filter:Alpha(opacity=50);
        }
        #myBox1{
            left:400px
        }
    </style>
</head>
<body>
<div id="myBox" class="myBox">
    <div id="targetMask"  class="targetMask">Mask</div>
</div>
<div id="myBox1" class="myBox">
    <div id="targetMask1"  class="targetMask">Mask</div>
</div>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="jquery.maskShow.js"></script>
<script>
    $('.myBox').maskShow('.targetMask');
</script>
</body>
</html>